<template>
	<view class="content">
		<view class="yinsi" v-html="yinsi"></view>
		<view class="tongyi" @click="back()">我同意</view>
	</view>
</template>

<script>
import getdata from '@/common/ajax.js';		
	export default {
		data() {
			return {
				yinsi:''
			}
		},
		onLoad(){
			this.xieyi()
		},
		methods: {
			back(){
				uni.navigateBack();
			},
			xieyi(){
				//用户信息
				var _this = this
				uni.showLoading({
				    title: '加载中'
				});
				uni.request({
					url: getdata.websiteUrl + '/index/agreement',
					header:{'content-type': "application/x-www-form-urlencoded"},
					dataType: 'json',
					method: 'POST',
					success: res => {
						console.log(res)
						uni.hideLoading();
						if(res.data.code == 1){
							_this.yinsi =   res.data.data.user_agreement
						}else{
							getdata.shou(res.data.msg)
						}
						
					},
					fail: res => {
						uni.hideLoading();
						getdata.shou('服务器断开链接')
					}
				});
			},
		}
	}
</script>

<style lang="scss">
.content{
	width: 100%;
	box-sizing: border-box;
	padding:40rpx 30rpx;
	.yinsi{
		font-size: 24rpx;
		line-height: 1.5;
		font-family: PingFang SC;
		color: #000000;
		p{
			span{
				font-size: 24rpx !important;
			}
			a{
				font-size: 24rpx !important;
			}
		}
	}
	.tongyi{
		width: 300rpx;
		height: 90rpx;
		line-height: 90rpx;
		background: #1578F2;
		border-radius: 45rpx;
		font-size: 24rpx;
		font-family: PingFang SC;
		color: #FFFFFF;
		text-align: center;
		margin: 0 auto;
		margin-top: 47rpx;
	}
}
</style>
